package com.prs.crm.dao.flow.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.flow.FlowVerifyDetailDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.flow.FlowVerifyDetail;
import com.prs.crm.domain.flow.WorkFlowAndPerson;

public class FlowVerifyDetailDaoImpl extends BaseDaoImpl<FlowVerifyDetail> implements FlowVerifyDetailDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<FlowVerifyDetail> getFlowVerifyDetails(
			WorkFlowAndPerson workFlowAndPerson) {
		Criteria criteria=this.getSession().createCriteria(FlowVerifyDetail.class);
		criteria.add(Restrictions.eq("workFlowAndPerson", workFlowAndPerson));
		return criteria.list();
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<FlowVerifyDetail> getAllFlowVerifyDetails() {
		Criteria cri=this.getSession().createCriteria(FlowVerifyDetail.class);
		return cri.list();
	}

}
